
/** 请求 */
const request = (option: HttpClientOptions) => uni.$http.create().setConfig({ ...option, showLoading: false }).request();


/** 拼写 */
export default {
	/** 开始练习 */
	startSpell: (data: Record<string, string | number>) => request({ url: '/vocabulary-spell/start', method: 'post', data }),
	
	/** 获取拼写词汇列表 */
	spelllist: (data: Record<string, string | number>) => request(({ url: '/course-vocabulary/spell-list', data })),
	
	/** 提交练习 */
	saveWords: (data: Record<string, string | number>) => request({ url: '/vocabulary-spell/save-words', data, method: 'put' }),
	
	/** 结束练习 */
	endSpell: (data: Record<string, string | number>) => request({ url: '/vocabulary-spell/end', method: 'put', data }),
	
	/** 切换词库 */
	thesaurus: (data: Record<string, string | number>) => request({ url: '/vocabulary-spell/thesaurus', method: 'put', data }),
	
	/** 单词拆分 */
	splitWord: (data: Record<string, string | number>) => request({ url: '/vocabulary-spell/split', data }),
};